Home:ALL Converter>What does return yytext[0] do?

What does return yytext[0] do?

Ask Time:2015-11-23T02:45:05         Author:Khacho

Json Formatter

In this lex part of a lex-yacc program what is the purpose of adding the lines

. return yytext[0];
\n return yytext[0];

This the lex part

%{
#include "y.tab.h"
%}
%%
a return A;
b return B;
. return yytext[0];
\n return yytext[0];
%%

What does it return when it encounters \n ?

Author:Khacho,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/33858679/what-does-return-yytext0-do
yy